package com.tuanzi.loan.business.service.family.impl;

import com.tuanzi.loan.business.repository.family.LoanLargeH5StatRepository;
import com.tuanzi.loan.business.service.family.LoanLargeAmountPartnerControlService;
import com.tuanzi.loan.business.service.family.LoanLargeH5StatService;
import com.tuanzi.loan.core.aspect.Debug;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.LoanLargeH5StatSearchRequest;
import com.tuanzi.loan.vo.response.family.LoanLargeAmountPartnerControlSearchResponse;
import com.tuanzi.loan.vo.response.family.LoanLargeH5StatSearchResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.retry.RetryException;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Debug
@Service
@Transactional
@Retryable(value = {RetryException.class})
public class LoanLargeH5StatServiceImpl implements LoanLargeH5StatService {
    @Autowired
    LoanLargeAmountPartnerControlService loanLargeAmountPartnerControlService;

    @Autowired
    StringRedisTemplate stringRedisTemplate;
    @Autowired
    private LoanLargeH5StatRepository loanLargeH5StatRepository;

    @Override
    public Page<LoanLargeH5StatSearchResponse> list(PageSearcher<LoanLargeH5StatSearchRequest> pageSearcher) {
        return loanLargeH5StatRepository.list(pageSearcher.getSearchCondition(), pageSearcher.getPageable());
    }

    @Override
    public List<String> queryProName() {
        return loanLargeH5StatRepository.queryProName();
    }

    @Override
    public List<String> selectChannelInfo() {
        return loanLargeH5StatRepository.selectChannelInfo();
    }

    @Override
    public LoanLargeAmountPartnerControlSearchResponse findCurrentNameInLargeAmount() {
        return loanLargeH5StatRepository.findCurrentNameInLargeAmount();
    }

}
